﻿using OnlineAuction.Business;
using OnlineAuction.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OnlineAuction.Ajax
{
    public partial class GetTime : System.Web.UI.Page
    {
        public AuctionDTO auction;
        public string aid;
        protected void Page_Load(object sender, EventArgs e)
        {

            if (Request.QueryString["AuctionID"] != null)
            {
                aid = Request.QueryString["AuctionID"].ToString();
                AuctionBO bo = new AuctionBO();
                int auctionID = int.Parse(aid);
                auction = bo.ViewDetailItem(auctionID);

                Response.Expires = -1;
                Response.ContentType = "text/plain";
                Response.Write(auction.LeftSeconds);
                Response.End();
            }
        }
    }
}